/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package intelligenttm.SourceFile;

import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.event.EventType;
import javafx.scene.control.Button;
import javafx.scene.control.ContentDisplay;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.input.MouseEvent;
import javafx.scene.paint.Color;
import javafx.scene.shape.Rectangle;
import me.aviator.entity.myColor;
import org.w3c.dom.css.Rect;

/**
 *
 * @author 望舒凌霄
 */
public class FenJiCartoType {
    String BeginNum="0";
    String EndNum="0";
    Color c=Color.rgb(200, 200, 200);
    Rectangle RectangleBox=new Rectangle(65,25,c);
    public FenJiCartoType() {
        RectangleBox.setOnMouseClicked(new EventHandler<MouseEvent>() {

            public void handle(MouseEvent e) {
                MyColorChooser MCC=new MyColorChooser();
                c=Color.rgb(MCC.GetR(), MCC.GetG(), MCC.GetB(),MCC.GetA()/255);
                RectangleBox.setFill(c);
            }
        });
    }
    
    public FenJiCartoType(String BNum,String ENum) {
        BeginNum=BNum;
        EndNum=ENum;
        RectangleBox.setOnMouseClicked(new EventHandler<MouseEvent>() {

            public void handle(MouseEvent e) {
                MyColorChooser MCC=new MyColorChooser();
                c=Color.rgb(MCC.GetR(), MCC.GetG(), MCC.GetB(),MCC.GetA()/255);
                RectangleBox.setFill(c);
            }
        });
    }
    
    public FenJiCartoType(String BNum,String ENum,Color tc) {
        BeginNum=BNum;
        EndNum=ENum;
        c=tc;
        RectangleBox.setFill(c);
        RectangleBox.setOnMouseClicked(new EventHandler<MouseEvent>() {

            public void handle(MouseEvent e) {
                MyColorChooser MCC=new MyColorChooser();
                c=Color.rgb(MCC.GetR(), MCC.GetG(), MCC.GetB(),MCC.GetA()/255);
                RectangleBox.setFill(c);
            }
        });
    }
    
    public FenJiCartoType(String BNum,String ENum,int R,int G,int B) {
        BeginNum=BNum;
        EndNum=ENum;
        c=Color.rgb(R, G, B);
        RectangleBox.setFill(c);
        RectangleBox.setOnMouseClicked(new EventHandler<MouseEvent>() {

            public void handle(MouseEvent e) {
                MyColorChooser MCC=new MyColorChooser();
                c=Color.rgb(MCC.GetR(), MCC.GetG(), MCC.GetB(),MCC.GetA()/255);
                RectangleBox.setFill(c);
            }
        });
    }
    
    public FenJiCartoType(String BNum,String ENum,int R,int G,int B,double A) {
        BeginNum=BNum;
        EndNum=ENum;
        c=Color.rgb(R, G, B, A);
        RectangleBox.setFill(c);
        RectangleBox.setOnMouseClicked(new EventHandler<MouseEvent>() {

            public void handle(MouseEvent e) {
                MyColorChooser MCC=new MyColorChooser();
                c=Color.rgb(MCC.GetR(), MCC.GetG(), MCC.GetB(),MCC.GetA()/255);
                RectangleBox.setFill(c);
            }
        });
    }
    
    public FenJiCartoType(String BNum,String ENum,myColor tc) {
        BeginNum=BNum;
        EndNum=ENum;
        c=Color.rgb(tc.getRed(), tc.getGreen(), tc.getBlue());
        RectangleBox.setFill(c);
        RectangleBox.setOnMouseClicked(new EventHandler<MouseEvent>() {

            public void handle(MouseEvent e) {
                MyColorChooser MCC=new MyColorChooser();
                c=Color.rgb(MCC.GetR(), MCC.GetG(), MCC.GetB(),MCC.GetA()/255);
                RectangleBox.setFill(c);
            }
        });
    }
    
    public Color getC() {
        return c;
    }

    public void setC(Color c) {
        this.c = c;
    }

    public Rectangle getRectangleBox() {
        return RectangleBox;
    }
    
    public void setRectangleBox(Rectangle RectangleBox) {
        this.RectangleBox = RectangleBox;
    }

    public String getBeginNum() {
        return BeginNum;
    }

    public void setBeginNum(String BeginNum) {
        this.BeginNum = BeginNum;
    }

    public String getEndNum() {
        return EndNum;
    }

    public void setEndNum(String EndNum) {
        this.EndNum = EndNum;
    }

    public Color getColor() {
        return c;
    }

    public void setColor(Color c) {
        this.c = c;
    }
    
    
    
}
